let { db } = require('../../tools');

module.exports = (req, res) => {
    // console.log(req.query);
    let { rank, _id } = req.query;

    db.collection('power')
        .updateOne({ _id }, {rank: +rank})
            .then(data => {
                res.json({errno: 0})
            })
            .catch(err => res.json(err))
    
}
